'''
Created on 2019年6月6日

@author: Administrator
'''
import mysql.connector

mydb = mysql.connector.connect(
    host = "47.100.212.206",
    user = "root",
    passwd = "root",
    database = "test"
    
    )
print(mydb)
mycursor = mydb.cursor()
 
mycursor.execute("SHOW DATABASES")
 
for x in mycursor:
    print(x)